mapSuspend

inline suspend fun <R, T> Result<T>.mapSuspend(crossinline transform: suspend (value: T) -> R): Result<R>

Performs a mapping operation on the Result, transforming the value if the Result is a success.

Return

Result representing the transformed value or failure based on the current Result state.

Parameters

transform

A suspend function to transform the value on success.